package com.ruoyi.channel.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.mapper.ChannelCountUvInfoMapper;
import com.ruoyi.db.domain.ChannelCountUvInfo;
import com.ruoyi.channel.service.IChannelCountUvInfoService;

/**
 * 渠道统计uv信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-01
 */
@Service
@DataSource(DataSourceType.SLAVE)
public class ChannelCountUvInfoServiceImpl implements IChannelCountUvInfoService 
{
    @Autowired
    private ChannelCountUvInfoMapper channelCountUvInfoMapper;

    /**
     * 查询渠道统计uv信息
     * 
     * @param id 渠道统计uv信息主键
     * @return 渠道统计uv信息
     */
    @Override
    public ChannelCountUvInfo selectChannelCountUvInfoById(Long id)
    {
        return channelCountUvInfoMapper.selectChannelCountUvInfoById(id);
    }

    /**
     * 查询渠道统计uv信息列表
     * 
     * @param channelCountUvInfo 渠道统计uv信息
     * @return 渠道统计uv信息
     */
    @Override
    public List<ChannelCountUvInfo> selectChannelCountUvInfoList(ChannelCountUvInfo channelCountUvInfo)
    {
        return channelCountUvInfoMapper.selectChannelCountUvInfoList(channelCountUvInfo);
    }

    /**
     * 查询渠道统计uv信息列表
     *
     * @param channelCountUvInfo 渠道统计uv信息
     * @return 渠道统计uv信息
     */
    @Override
    public List<Map<String, Object>> selectChannelCountUvInfoMapList(ChannelCountUvInfo channelCountUvInfo)
    {
        return channelCountUvInfoMapper.selectChannelCountUvInfoMapList(channelCountUvInfo);
    }
    @Override
    public List<Map<String, Object>> selectChannelCountList(ChannelCountUvInfo channelCountUvInfo)
    {
        return channelCountUvInfoMapper.selectChannelCountList(channelCountUvInfo);
    }

    /**
     * 新增渠道统计uv信息
     * 
     * @param channelCountUvInfo 渠道统计uv信息
     * @return 结果
     */
    @Override
    public int insertChannelCountUvInfo(ChannelCountUvInfo channelCountUvInfo)
    {
        channelCountUvInfo.setCreateTime(DateUtils.getNowDate());
        return channelCountUvInfoMapper.insertChannelCountUvInfo(channelCountUvInfo);
    }

    /**
     * 修改渠道统计uv信息
     * 
     * @param channelCountUvInfo 渠道统计uv信息
     * @return 结果
     */
    @Override
    public int updateChannelCountUvInfo(ChannelCountUvInfo channelCountUvInfo)
    {
        return channelCountUvInfoMapper.updateChannelCountUvInfo(channelCountUvInfo);
    }

    /**
     * 批量删除渠道统计uv信息
     * 
     * @param ids 需要删除的渠道统计uv信息主键
     * @return 结果
     */
    @Override
    public int deleteChannelCountUvInfoByIds(Long[] ids)
    {
        return channelCountUvInfoMapper.deleteChannelCountUvInfoByIds(ids);
    }

    /**
     * 删除渠道统计uv信息信息
     * 
     * @param id 渠道统计uv信息主键
     * @return 结果
     */
    @Override
    public int deleteChannelCountUvInfoById(Long id)
    {
        return channelCountUvInfoMapper.deleteChannelCountUvInfoById(id);
    }

    @Override
    public int deleteChannelCountUvInfoByDateInfo(String dateInfo) {
        return channelCountUvInfoMapper.deleteChannelCountUvInfoByDateInfo(dateInfo);
    }
}
